package one_07_OOP.demo04;

public class Teacher extends Person{
    // 隐藏了父类的构造器
    // 相当于
    // super();// 调用父类的构造器必须写在子类构造器的第一行
    // this();// 调用本类的构造器，必须写在第一行。
    public Teacher() {
        System.out.println("Teacher无参构造执行");
    }

    private String name="秦寿";
    
    public void test(String name){
        System.out.println(name);//清江
        System.out.println(this.name);//秦寿
        System.out.println(super.name);//qinshou
    }

    public void meth01(){
        System.out.println("Teacher");
    }
    public void meth02(){
        meth01();//Teacher
        this.meth01();//Teacher
        super.meth01();//Person
    }
}
